home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / lib / cdf_exists.pro < prev    next >
Text File  |  1997-07-08  |  1KB  |  64 lines

  1. ; $Id: cdf_exists.pro,v 1.3 1997/02/22 02:33:32 ali Exp $
  2. ;
  3. ;
  4. ; Copyright (c) 1992-1997, Research Systems, Inc.  All rights reserved.
  5. ;    Unauthorized reproduction prohibited.
  6. ;
  7. ;+
  8. ; NAME:
  9. ;    CDF_EXISTS
  10. ;
  11. ; PURPOSE:
  12. ;    Test for the existence of the CDF library
  13. ;
  14. ; CATEGORY:
  15. ;    File Formats
  16. ;
  17. ; CALLING SEQUENCE:
  18. ;    Result = CDF_EXISTS()
  19. ;
  20. ; INPUTS:
  21. ;    None.
  22. ;
  23. ; KEYWORD PARAMETERS:
  24. ;    None.
  25. ;
  26. ; OUTPUTS:
  27. ;    Returns TRUE (1) if the CDF data format library is
  28. ;    supported. Returns FALSE(0) if it is not.
  29. ;
  30. ; EXAMPLE:
  31. ;    IF cdf_exists() EQ 0 THEN Fail,"CDF not supported on this machine"
  32. ;
  33. ; MODIFICATION HISTORY
  34. ;    Written by:    Joshua Goldstein,  12/8/92
  35. ;
  36. ;-
  37.  
  38. ;    A fake function if libraries don't exist
  39. FUNCTION cdf_inquire,x
  40.     return,0
  41. END
  42.  
  43. ;
  44. FUNCTION cdf_exists
  45.     ; CDF is not available in the IDL Student Edition
  46.     ;
  47.     ; NOTE: The LMGR function is undocumented, considered private
  48.     ; to RSI, and is subject to change or removal from IDL at any
  49.     ; time without notice.
  50.     if (LMGR(/STUDENT) eq 1) then return, 0
  51.  
  52.     on_ioerror, ok
  53.     oldquiet= !quiet
  54.     !quiet=1
  55.  
  56.     x=cdf_inquire(0)
  57.     !quiet=oldquiet
  58.     return,0
  59.  
  60.    ok:
  61.     !quiet=oldquiet
  62.     return,1
  63. END
  64.